/**
 *复制下面的方法 直接调用就行 value 就传对应的时间  如：Thu Jun 13 2019 10:41:09 GMT+0800 (中国
 *标准时间)
 */
export function dateConversion(value) {
    var d = new Date(value);

    var date = d.getFullYear() + '-' + ((d.getMonth() + 1) * 1 < 10 ? `0${d.getMonth() + 1}` : `${d.getMonth() + 1}`) + '-' + (d.getDate() * 1 < 10 ? `0${d.getDate()}` : `${d.getDate()}`)
    return date;
}
function p(s) {
    return s < 10 ? '0' + s : s
}
export function dateTimeConversion(value) {
    var d = new Date(value);

    var date = d.getFullYear() + '-' + ((d.getMonth() + 1) * 1 < 10 ? `0${d.getMonth() + 1}` : `${d.getMonth() + 1}`) + '-' + (d.getDate() * 1 < 10 ? `0${d.getDate()}` : `${d.getDate()}`) + " " + p(d.getHours()) + ':' + p(d.getMinutes()) + ":" + p(d.getSeconds())
    return date;
}